<%
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
include("/pages/template/head.html"){}
%>
<script type="text/javascript">
    var oper = {
        save:function(id){
            if(!validForm()) {
                return false;
            }
            id = id || "";
            var url = 'system/productinfo/save/'+id;
            form1.action = url;
            form1.submit();
            return true;
        }
    };

</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
	  role="form" >
	<input type="hidden" name="model.ids" value="${model.ids}" />

	<table class="table">
		<% // 列表头部 %>
	<!--	<tr>
			<td>部门</td>
			<td>
				<select name="model.departid" class="form-control" valid="vselect" validname="部门">
					<option value="-1">--请选择--</option>
					${departSelect}
				</select>
			</td>
		</tr>-->
		
	
		<tr>
			<td>供应商名称</td>
			<td>
					   	<select name="model.providerId" class="form-control" valid="vselect" validname="请选择供应商">
						<option value="-1">--请选择供应商--</option>
						${selectProvider }
						</select>
			</td>
		</tr>
			<tr>
			<td>产品名称</td>
			<td>
				<input class="form-control" type="text" name="model.productName"
					   value="${model.productName}" valid="vtext" validname="产品名称" />
			</td>
		</tr>
		<tr>
			<td>产品类型</td>
			<td>
				<select name="model.productType" class="form-control" valid="vselect" >
					<option value="-1">--请选择--</option>
					<option value="0" ${model.productType=="0"?"selected":"" }>前向</option>
					<option value="1" ${model.productType=="1"?"selected":"" }>后向</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>流量类型</td>
				<td>
				<select name="model.range" class="form-control" valid="vselect" >
					<option value="-1">--请选择--</option>
					<option value="0" ${model.range=="0"?"selected":"" }>月包</option>
					<option value="1" ${model.range=="1"?"selected":"" }>日包</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>可用区域</td>
				<td>
				<select name="model.region" class="form-control" valid="vselect" >
					<option value="-1">--请选择--</option>
					<option value="0" ${model.region=="0"?"selected":"" }>国内</option>
					<option value="1" ${model.region=="1"?"selected":"" }>省内</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>可用省份</td>
			<td>
					   	<select name="model.province" class="form-control" valid="vselect" validname="请选择省份">
						<option value="-1">--请选择省份--</option>
						${selectProvince }
						</select>
			</td>
		</tr>
		
		
		<tr>
			<td>产品编码</td>
			<td>
				<input class="form-control" type="text" name="model.productCode"
					   value="${model.productCode}" valid="vtext" validname="产品编码" />
			</td>
		</tr>
		<tr>
			<td>产品价格</td>
			<td>
				<input class="form-control" type="text" name="model.productPrice"
					   value="${model.productPrice}" valid="vtext" validname="产品价格" />
			</td>
		</tr>
		<tr>
			<td>产品折扣</td>
			<td>
				<input class="form-control" type="text" name="model.discount"
					   value="${model.discount}" valid="vtext" validname="产品折扣" />
			</td>
		</tr>
		
		<tr>
			<td>折后价格</td>
			<td>
				<input class="form-control" type="text" name="model.discountPrice"
					   value="${model.discountPrice}" valid="vtext" validname="折后价格" />
			</td>
		</tr>
		<tr>
			<td>状态</td>
				<td>
				<select name="model.productStatus" class="form-control" valid="vselect" >
					<option value="-1">--请选择--</option>
					<option value="0" ${model.productStatus=="0"?"selected":"" }>有效</option>
					<option value="1" ${model.productStatus=="1"?"selected":"" }>失效</option>
				</select>
			</td>
		</tr>
	<tr>
			<td>产品描述</td>
			<td>
			<textarea class="form-control" rows="3" cols="30" name="model.productDesc" valid="vtext">${model.productDesc}</textarea>
			</td>
		</tr>
	
	</table>

	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
		<div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
		
			<button class="btn btn-primary" onclick="oper.save('${model.ids}');return false;">保 存</button>
			
			<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
		</div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>